namespace Wigy.TimeInsight
{
    using System;

    internal static class EventHandlerExtensions
    {
        public static void SafeInvoke<TArgs>(this EventHandler<TArgs> handler, object sender = null, TArgs e = default(TArgs)) where TArgs : EventArgs
        {
            if (handler == null) return;
            handler(sender, e);
        }
    }
}